/* 
 * File:   MathFunctions.h
 *
 *      Author: Jerome RD Soine and Christoph A Brand
 *      Institution: Schwarz goup, Institute for Theoretical Physics, Heidelberg University, Germany
 */

#ifndef MATHFUNCTIONS_H
#define	MATHFUNCTIONS_H

#include <iostream>

/**
 * @Class MathFunctions
 * 
 * @brief Provides several basic mathematical functions often used in inherited classes.
 * 
 * This Class provides a set of basic mathematical calculations. It provides:
 * 
 * <ul>
 * <li> Dirac symbol and the Levi-Civita Symbol </li>
 * <li> Matrix operations like transpose, multiply, trace, determinant and square </li>
 * <li> Tensor product and Deviator</li>
 * </ul>
 * 
 * Usage: For mathematical operations in inherited classes. So it is recommended to pass this class 
 * with argument <i> public virtual</i>.
 * 
 * @author Jerome Soine (Bioquant & ITP, Heidelberg University)
 **/


class MathFunctions {
public:
  static double levi_civita(unsigned int,unsigned int,unsigned int); 
  static double dirac(unsigned int, unsigned int);
  static void transpose (double(&matrix)[3][3]);
  static void square_matrix (double (&matrix) [3][3], double (&squared_matrix) [3][3]);
  static void trace(double(&matrix) [3][3], double &trace_value);
  static void det(double (&matrix) [3][3], double &det_value);
  static void multiply(double (&m1) [3][3], double (&m2) [3][3], double (&result) [3][3]);
  static void tensor_product(double (&m1) [3][3], double (&m2) [3][3], double (&result) [3][3][3][3]);
  static void deviator(double (&m1)[3][3], double (&result)[3][3]);
};


#endif
